docs: Add details
authorMatthias Clasen <mclasen@redhat.com>
Sat, 16 Jan 2021 19:45:20 +0000 (14:45 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 16 Jan 2021 19:45:20 +0000 (14:45 -0500)
Explain the difference between GtkPicture and GtkImage,
and when you might want to use which.

gtk/gtkimage.c
gtk/gtkpicture.c

index 730660ff06ae635787fd1d933a7695b3467bab26..5c53a5ede1a9138f9518d122a642b36478e42240 100644 (file)
@@ -44,7 +44,7 @@
  * SECTION:gtkimage
  * @Short_description: A widget displaying an image
  * @Title: GtkImage
- * @SeeAlso: #GdkTexture
+ * @SeeAlso: #GdkTexture, #GtkPicture
  *
  * The #GtkImage widget displays an image. Various kinds of object
  * can be displayed as an image; most typically, you would load a
  * In this case, the #GtkImage:resource, gtk_image_new_from_resource() and
  * gtk_image_set_from_resource() should be used.
  *
+ * GtkImage displays its image as an icon, with a size that is determined
+ * by the application. See #GtkPicture if you want to show an image at is
+ * actual size.
+ *
  * # CSS nodes
  *
  * GtkImage has a single CSS node with the name image. The style classes
index 6f0eb83240a4af78679fec3527170731df90acf2..0668cad14b250c0aa59f93b45898762aa0009490 100644 (file)
@@ -56,6 +56,9 @@
  * In this case, gtk_picture_new_for_resource() and gtk_picture_set_resource()
  * should be used.
  *
+ * GtkPicture displays an image at its natural size. See #GtkImage if you want
+ * to display a fixed-size image, such as an icon.
+ *
  * # Sizing the paintable
  *
  * You can influence how the paintable is displayed inside the #GtkPicture.